package com.luoy.token;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
 * @author LUOYUAN
 * @create 2019-03-07-16:52
 */
@Component
public class JwtTokenService {

    @Value("${jwt.expire}")
    private int expire;

    public String generatorToken(JwtInfo jwtInfo){
        return JwtTokenUtil.generatorToken(jwtInfo,expire);
    }

    public JwtInfo getInfoFromToken(String token){
        return JwtTokenUtil.getTokenInfo(token);
    }
}
